#include<vector>
#include<unordered_set>
using namespace std;

class Solution {
public:
    vector<int> divingBoard(int shorter, int longer, int k) {
        if (k == 0) {
            vector<int>res;
            return vector<int>{};
        }
        if (shorter == longer) {
            return vector<int>{k};
        }
        vector<int>res(k + 1);
        for (int i = 0; i <= k; ++i) {
            int tmp = i * longer + (k - i) * shorter;
            res[i] = tmp;
        }
        return res;
    }
};